<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>OAUTH2统一认证</title>
    <link href="/css/bootstrap.min.css" rel="stylesheet">
    <link href="/css/signin.css" rel="stylesheet">
</head>

<body>
<div class="container form-margin-top">
    <form class="form-signin" method="post" th:action="@{/authentication/require}">
        <h2 class="form-signin-heading" align="center">统一认证系统</h2>
        <input type="text" name="username" class="form-control form-margin-top" placeholder="账号" required autofocus th:value="${hasError? authError.username : 'admin'}">
        <br/>
        <input type="password" name="password" class="form-control" placeholder="密码" required th:value="${hasError? authError.password : '123456'}">
        <input type="text" name="captchaCode" class="form-control mt-20 mb-20 w-half" placeholder="验证码" required value="1234" th:value="${hasError? '' : '1234'}" >
        <div style="background-color: #1b6d85;margin: -58px 0 0 192px;height: 30px;width: 70px;padding-top: 5px;text-align: center;">
            <span style="font-size: 16px;">1 2 3 4</span>
        </div>
        <div style="margin-top: 30px;height: 30px;width: 70px;">
            <input type="checkbox" checked="checked" name="rememberMe" class="checkbox" id="checkbox" value="1" >
            <label style="margin-top: -51px;display: inline-block;vertical-align: middle;" for="checkbox">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;记住我</label>
        </div>
        <button class="btn btn-lg btn-primary btn-block" type="submit">登录</button>
    </form>
</div>
<span id="authError" th:if="${hasError}" th:text="${authError.message}" style="display: none"></span>
<script type="text/javascript" src="/js/jquery-1.12.4.js"></script>
<script type="text/javascript">
    var authError = $("#authError");
    console.info("af", authError);
    if (authError.length > 0) {
        alert(authError.text());
    }
</script>
</body>


</html>
